package com.atguigu.lease.common.context;

/**
 * @author = 赵子涵
 * @date = 2025/5/10 17:11
 * @function =
 */
public class LoginUserContext {
    private static final ThreadLocal<LoginUser>THREAD_LOCAL=new ThreadLocal<>();
    public static void setLoginUser(LoginUser loginUser){
        THREAD_LOCAL.set(loginUser);
    }
    public static LoginUser getLoginUser(){
        return THREAD_LOCAL.get();
    }
    public void clear(){
        THREAD_LOCAL.remove();
    }
}
